import axios from 'axios';

axios.defaults.baseURL = 'http://localhost:8080/day11/';
axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded';


const get = (url,params)=>{
    return axios({
        method:'GET',
        url:url,
        params:params,
    })
}

const post = (url,params)=>{
    return axios({
        method:'POST',
        url:url,
        data:params
    })
}

export {get,post}